package com.my.classes.sealedc;

/**
 * @author: marshal
 * @date: 2021-08-26 3:09 PM
 * <p>
 * When the permitted subclasses are small in size and number, it may be convenient to declare them in the same source file as the sealed class.
 * When they are declared in this way, the sealed class may omit the permits clause and the Java compiler will infer the permitted subclasses from
 * the declarations in the source file.
 */
public abstract sealed class Root {
    final class A extends Root {
    }

    final class B extends Root {
    }

    final class C extends Root {
    }
}
